-- 编辑元数据
local PluginName = "SDK1"
local License = "MIT"
local Module = {}
local MetaData = {Name = PluginName, License=License}
-- 初始化Plugin SDK
local logger = LOG(MetaData)

function PLUGIN_MetaData()
    -- 返回元数据

    return PluginName, License, Module
end
--

function Init()
    logger.info("加载完成")
    local system = os(MetaData)

    local MaxLogs = 5 -- 允许的log file 上限！

    if not system then
        GetSystem(MetaData)

    else
        files = system.listdir("logs/")
        if LEN(files) > MaxLogs then
            for i = 0, LEN(files) do
                if LEN(files) <= MaxLogs then
                    break
                end
                system.remove("logs/" .. files[i])
                files = system.listdir("logs/")
            end
        end
    end

end